package com.kgc.dao;

import com.kgc.entity.Order;
import com.kgc.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author :qinya
 * @PackageName:com.kgc.dao
 * @ClassName: OrderMapper
 * @Description: TODO
 * @date : 2025/5/23,10:57
 */
@Mapper
public interface OrderMapper {
    List<Order> selectOrderByPage(@Param("params") Map<String, Object> params);

    int insertOrder(@Param("order") Order order);

    int insertOrderDetail(@Param("orderDetail") OrderDetail orderDetail);

    int updateOrderPay(@Param("params") Map<String, Object> params);

    int updateOrderRefund(String serialNumber);

    int updateOrderClose(String serialNumber);

    int deleteOrder(int id);

    Order selectOrderBySerialNumber(String serialNumber);

    List<OrderDetail> selectProductQuantity(int orderId);

}
